# -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from PIC_SERVER.PIC.utils import getHtml, getImg2


def network_pic(request):
	i = 1184
	img_list = []
	while True:
		if i == 1186:
			break
		website = "http://jandan.net/ooxx/page-%i" % i
		# website = "http://jandan.net/ooxx"
		html = getHtml(website)
		list = getImg2(html)
		i += 1
		img_list.extend(list)
		print("已采集第" + str(i) + "页图片")

	return render_to_response('pic/pic_list.html', locals(), context_instance=RequestContext(request))


def test():
	pass

